#include <iostream>
using namespace std;
class Box{
public:
    Box(){}
    Box(double s){
        a = s;
    }
    void seta(double s){
        a = s;
    }
    double getvolume(){
        return a*a*a;
    }
    double getarea(){
        return 6*a*a;
    }
    void disp(){
        cout<<"体积为"<<getvolume()<<endl;
        cout<<"表面积为"<<getarea()<<endl;
    }

private:
    double a;
};

int main(){
    Box *box = new Box();
    box->seta(5);
    box->disp();
}

